package hu.myai.api.indicators;

import hu.myai.model.IndicatorVO;

/**
 * @author bozbalint
 *
 */
public abstract interface IndicatorConsumerInterface {

    /**
     * Get the Unique name
     * 
     * @return the name
     */
    public String getName();

    /**
     * This method is called to set the new indicator value
     */
    public void addIndicator(String indicatorName, IndicatorVO indicatorValue);

    /**
     * When an indicator depends on another indicator all input data needs to be
     * collected to do the calculation. This is mandatory if the process is
     * asynchronous. This is to check all data is the set.
     * 
     * When an trigger registers itself in an indicator (addListeningTrigger)
     * than the indicator registers itself using this method. This is because 2
     * way dependency.
     * */
    public boolean addIndicatorNameForCheck(String nameForCheck);

    /**
     * When an indicator depends on another indicator all input data needs to be
     * collected to do the calculation. This is mandatory if the process is
     * asynchronous. This is for check all data is set.
     * 
     * When an trigger removes itself from an indicator (removeListeningTrigger)
     * than the indicator unregisters itself using this method. This is because
     * of the 2 way dependency.
     * */
    public boolean removeIndicatorNameForCheck(String nameForCheck);

}
